home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / oath.lha / oath / test / ms2a.cc < prev    next >
C/C++ Source or Header  |  1991-08-29  |  899b  |  32 lines

  1. #include "oath/minString.h"
  2.  
  3. #include <fstream.h>
  4.  
  5. /////////////////////////////////////////////////////////////////////////////
  6. // Test of minStrings
  7.  
  8. main()
  9.    {// Create some Characters //////////
  10.     characterA R = characterA::make('r');
  11.     characterA S = characterA::make('s');
  12.     characterA T = characterA::make('t');
  13.     characterA L = characterA::make('l');
  14.     characterA N = characterA::make('n');
  15.     characterA E = characterA::make('e');
  16.     characterA A = characterA::make('a');
  17.  
  18.     // Create some Strings //////////
  19.     stringA Star   = minStringA::make() << T << A << R;
  20.     cout << Star.am() << "\t(" << Star.hash() << ")" << endl;
  21.  
  22.     stringA Sstare = minStringA::make() << S << Star << E;
  23.     cout << Sstare.am() << "\t(" << Sstare.hash() << ")" << endl;
  24.  
  25.     // Save the Strings //////////
  26.     ofstream File ("ms2.obj");
  27.  
  28.     Star.export(File);
  29.     Sstare.export(File);
  30.  
  31.    }
  32.